package com.dantwining.jade.oo;

import jade.core.Agent;
import jade.oo.core.behaviours.Behaviour;
import jade.oo.core.behaviours.Inbox;
import jade.oo.core.behaviours.InboxImpl;
import jade.oo.core.behaviours.Outbox;
import jade.oo.core.behaviours.OutboxImpl;

@SuppressWarnings("serial")
public class TimeResponderAgent extends Agent {

    @Override
    protected void setup() {

        Inbox inbox = new InboxImpl(this);
        Outbox outbox = new OutboxImpl(this);
        TimeResponderAction timeTeller = new TimeResponderAction(outbox);
        Behaviour timeResponder = new TimeRequestResponder(inbox,
                timeTeller);
        addBehaviour(timeResponder);

        // Add this behaviour *instead of* the one above if you want to see the
        // original Behaviour in action
        // addBehaviour(new TimeResponderJadeBehaviour());
    }
}
